using System.Data.Entity;
using System.Data.Entity.Infrastructure;
using Sysgeprava.Repository.Mapping;
using Sysgeprava.Entities;

namespace Sysgeprava.Repository
{
    public partial class DBSYSGEPRAVAContext : DbContext
    {
        static DBSYSGEPRAVAContext()
        {
            Database.SetInitializer<DBSYSGEPRAVAContext>(
                null
                //new DropCreateDatabaseIfModelChanges<DBSYSGEPRAVAContext>()
                //new DropCreateDatabaseAlways<DBSYSGEPRAVAContext>()
                //new SysgepravaDatabaseInitializer()
                );
        }

        public DBSYSGEPRAVAContext()
            : base("Name=DBSYSGEPRAVAContext")
        {
            this.Configuration.LazyLoadingEnabled = false;
            this.Configuration.ProxyCreationEnabled = false;
            this.Configuration.AutoDetectChangesEnabled = false;
        }

        public DbSet<ALIMENTO> ALIMENTOes { get; set; }
        public DbSet<BOVINO> BOVINOes { get; set; }
        //public DbSet<CLA_ETAPA> CLA_ETAPA { get; set; }
        public DbSet<CRIA> CRIAS { get; set; }
        public DbSet<DET_ALIMENTACION> DET_ALIMENTACION { get; set; }
        public DbSet<DET_ESTABLO> DET_ESTABLO { get; set; }
        public DbSet<DET_ORDENO> DET_ORDENO { get; set; }
        public DbSet<DIAG_ENFERMEDAD> DIAG_ENFERMEDAD { get; set; }
        public DbSet<ENFERMEDADE> ENFERMEDADES { get; set; }
        public DbSet<ESTABLO> ESTABLOes { get; set; }
        public DbSet<FINCA> FINCAs { get; set; }
        public DbSet<FOTO_BOVINO> FOTO_BOVINO { get; set; }
        public DbSet<FOTO_FINCA> FOTO_FINCA { get; set; }
        public DbSet<FOTO_TRABAJADOR> FOTO_TRABAJADOR { get; set; }
        public DbSet<MARCA> MARCAs { get; set; }
        public DbSet<MEDICAMENTO> MEDICAMENTOS { get; set; }
        public DbSet<MENU> MENUs { get; set; }
        public DbSet<OPERADOR> OPERADORs { get; set; }
        public DbSet<ORDENO> ORDENOes { get; set; }
        public DbSet<PAJILLA> PAJILLAs { get; set; }
        public DbSet<PRENE> PRENES { get; set; }
        public DbSet<PROPIETARIO> PROPIETARIOs { get; set; }
        public DbSet<RAZA> RAZAs { get; set; }
        public DbSet<RESPONSABLE> RESPONSABLEs { get; set; }
        public DbSet<ROL> ROLs { get; set; }
        public DbSet<SEXO> SEXOes { get; set; }
        public DbSet<TEL_PROPIETARIO> TEL_PROPIETARIO { get; set; }
        public DbSet<TEL_VETERINARIO> TEL_VETERINARIO { get; set; }
        public DbSet<TIP_APLICACION> TIP_APLICACION { get; set; }
        public DbSet<TIP_ENFERMEDAD> TIP_ENFERMEDAD { get; set; }
        public DbSet<TIP_ESTABLO> TIP_ESTABLO { get; set; }
        //public DbSet<TIP_PARTO> TIP_PARTO { get; set; }
        //public DbSet<TIP_REPRODUCCION> TIP_REPRODUCCION { get; set; }
        //public DbSet<TIP_SECADO> TIP_SECADO { get; set; }
        public DbSet<TIP_TRATAMIENTO> TIP_TRATAMIENTO { get; set; }
        public DbSet<TRABAJADOR> TRABAJADORs { get; set; }
        public DbSet<TRATAMIENTO_ENF> TRATAMIENTO_ENF { get; set; }
        public DbSet<UBIGEO> UBIGEOs { get; set; }
        public DbSet<USUARIO> USUARIOs { get; set; }
        public DbSet<USUARIO_MENU> USUARIO_MENU { get; set; }
        public DbSet<VETERINARIO> VETERINARIOs { get; set; }
        public DbSet<ETAPA> ETAPAs { get; set; }
        public DbSet<CONTROL> CONTROLs { get; set; }
        public DbSet<HIST_CONTROL> HIST_CONTROLs { get; set; }
        public DbSet<HIST_ETAPA> HIST_ETAPAs { get; set; }
        public DbSet<HIST_TRABAJADOR> HIST_TRABAJADORs { get; set; }
        public DbSet<TIPO_TRABAJADOR> TIPO_TRABAJADORs { get; set; }

        protected override void OnModelCreating(DbModelBuilder modelBuilder)
        {
            modelBuilder.Configurations.Add(new ALIMENTOMap());
            modelBuilder.Configurations.Add(new BOVINOMap());
            //modelBuilder.Configurations.Add(new CLA_ETAPAMap());
            modelBuilder.Configurations.Add(new CRIAMap());
            modelBuilder.Configurations.Add(new DET_ALIMENTACIONMap());
            modelBuilder.Configurations.Add(new DET_ESTABLOMap());
            modelBuilder.Configurations.Add(new DET_ORDENOMap());
            modelBuilder.Configurations.Add(new DIAG_ENFERMEDADMap());
            modelBuilder.Configurations.Add(new ENFERMEDADEMap());
            modelBuilder.Configurations.Add(new ESTABLOMap());
            modelBuilder.Configurations.Add(new FINCAMap());
            modelBuilder.Configurations.Add(new FOTO_BOVINOMap());
            modelBuilder.Configurations.Add(new FOTO_FINCAMap());
            modelBuilder.Configurations.Add(new FOTO_TRABAJADORMap());
            modelBuilder.Configurations.Add(new MARCAMap());
            modelBuilder.Configurations.Add(new MEDICAMENTOMap());
            modelBuilder.Configurations.Add(new MENUMap());
            modelBuilder.Configurations.Add(new OPERADORMap());
            modelBuilder.Configurations.Add(new ORDENOMap());
            modelBuilder.Configurations.Add(new PAJILLAMap());
            modelBuilder.Configurations.Add(new PRENEMap());
            modelBuilder.Configurations.Add(new PROPIETARIOMap());
            modelBuilder.Configurations.Add(new RAZAMap());
            modelBuilder.Configurations.Add(new RESPONSABLEMap());
            modelBuilder.Configurations.Add(new ROLMap());
            modelBuilder.Configurations.Add(new SEXOMap());
            modelBuilder.Configurations.Add(new TEL_PROPIETARIOMap());
            modelBuilder.Configurations.Add(new TEL_VETERINARIOMap());
            modelBuilder.Configurations.Add(new TIP_APLICACIONMap());
            modelBuilder.Configurations.Add(new TIP_ENFERMEDADMap());
            modelBuilder.Configurations.Add(new TIP_ESTABLOMap());
            //modelBuilder.Configurations.Add(new TIP_PARTOMap());
            //modelBuilder.Configurations.Add(new TIP_REPRODUCCIONMap());
            //modelBuilder.Configurations.Add(new TIP_SECADOMap());
            modelBuilder.Configurations.Add(new TIP_TRATAMIENTOMap());
            modelBuilder.Configurations.Add(new TRABAJADORMap());
            modelBuilder.Configurations.Add(new TRATAMIENTO_ENFMap());
            modelBuilder.Configurations.Add(new UBIGEOMap());
            modelBuilder.Configurations.Add(new USUARIOMap());
            modelBuilder.Configurations.Add(new USUARIO_MENUMap());
            modelBuilder.Configurations.Add(new VETERINARIOMap());
            modelBuilder.Configurations.Add(new ETAPAMap());
            modelBuilder.Configurations.Add(new CONTROLMap());
            modelBuilder.Configurations.Add(new HIST_CONTROLMap());
            modelBuilder.Configurations.Add(new HIST_ETAPAMap());
            modelBuilder.Configurations.Add(new HIST_TRABAJADORMap());
            modelBuilder.Configurations.Add(new TIPO_TRABAJADORMap());
        }
    }
}
